<?php

/**
*
*/
define('IN_SMART', true);
$smt_root_path = (defined('SMT_ROOT_PATH')) ? SMT_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($smt_root_path . 'common.' . $phpEx);

$user->session_begin();


// Grab channel list
$sql = 'SELECT 
			channel_id,
			channel_name,
			channel_desc,
			channel_stories
		FROM ' . CHANNELS_TABLE . ' 
		ORDER BY channel_id ASC';

$result = $db->sql_query($sql);

$channels = array();
while ($row = $db->sql_fetchrow($result))
{
	$channels[] = $row;
}
$db->sql_freeresult($result);

$template->assign('config', $config);
$template->assign('name', $user->data['username']);
$template->assign('channels', $channels);

page_header('Home - RSS editorial tool');

$tpl_body = 'index_body.html';
page_footer();

?>